package com.xuantu.pattern.create.singleton;

import java.util.concurrent.atomic.AtomicLong;

public abstract class BaseSingleton {

	// private long nextNumber = 1;
	private AtomicLong nextUniqueNumber = new AtomicLong();

	public Long getNextNumber() {
		// return nextNumber++;
		return nextUniqueNumber.incrementAndGet();
	}

	/*public synchronized Long getNextNumber() {
		return nextNumber++;
	}*/
	

}
